//
//  main.m
//  oc_分数类的创建
//
//  Created by blue on 16/4/12.
//  Copyright (c) 2016年 csx. All rights reserved.
//
#import "Fraction.h"
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        Fraction *f1 = [[Fraction alloc]initWithNumerator:3 andDenominator:7];
        //得到分数对象f1,它的值3/7
        [f1 printFraction];
        
        Fraction *f2=[[Fraction alloc]initWithNumerator:2 andDenominator:5];
        //得到分数对象f2,它的值2/5
        [f2 printFraction];
        
        //[f1 addFraction:f2];//相加的结果存入f1对象
        //[f1 printFraction];
        
    // [Fraction addAFraction:f1
     //             andBFraction:f2];
        
        
        //Fraction *f3 = [Fraction addFraction:f1 andFraction:f2];
        //[f3 printFraction];
        
        
        [Fraction subAFraction:f1 andBFraction:f2];
        
      }
        
    return 0;
}
